package com.hgyc.mom.tool.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.hgyc.mom.common.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 编码生成规则组成
 * </p>
 *
 * @author fwj
 * @since 2025-05-06
 */
@Data
@TableName("tool_auto_code_part")
@Schema(name="编码生成规则组成对象", description="编码生成规则组成对象")
public class AutoCodePart implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "分段ID")
    private Long id;

    @Excel(name = "规则ID")
    @Schema(description = "规则ID")
    private Long ruleId;

    @Excel(name = "分段序号")
    @Schema(description = "分段序号")
    private Long partIndex;

    @Excel(name = "分段名称")
    @Schema(description = "分段名称")
    private String partName;

    @Excel(name = "分段类型")
    @Schema(description = "分段类型，INPUTCHAR：输入字符，NOWDATE：当前日期时间，FIXCHAR：固定字符，SERIALNO：流水号")
    private String partType;

    @Excel(name = "分段长度")
    @Schema(description = "分段长度")
    private Long partLength;

    @Excel(name = "")
    @Schema(description = "")
    private String dateFormat;

    @Excel(name = "输入字符")
    @Schema(description = "输入字符")
    private String inputCharacter;

    @Excel(name = "固定字符")
    @Schema(description = "固定字符")
    private String fixCharacter;

    @Excel(name = "流水号起始值")
    @Schema(description = "流水号起始值")
    private Long serialStartNo;

    @Excel(name = "流水号步长")
    @Schema(description = "流水号步长")
    private Long serialStep;

    @Excel(name = "循环方式，YEAR：按年，MONTH：按月，DAY：按天，HOUR：按小时，MINUTE：按分钟")
    @Schema(description = "循环方式，YEAR：按年，MONTH：按月，DAY：按天，HOUR：按小时，MINUTE：按分钟")
    private String cycleMethod;

    @Excel(name = "备注")
    @Schema(description = "备注")
    private String remark;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建者")
    private Long createBy;

    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新者")
    private Long updateBy;

    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}